<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>【北极海洋生态系统信息共享平台欢迎您！】</title>
<script language="javascript">
function submit_admin_me()
{
	window.alert("以管理员身份登录");
	var username=document.getElementById("username").value;
	var password=document.getElementById("password").value;
	if(username==""||username=="Username")
	{
		window.alert("请输入 用户名 !");
		return false;
		}
	if(password==""||password=="Username")
	{
		window.alert("请输入 密码 !");
		return false;
		}
	document.getElementById("form1").action='<%=request.getContextPath()%>/admin_login.do?method=admin_login';
	document.getElementById("form1").submit();

}



function submit_me()
{
	document.getElementById("submit_button").disabled;
	//document.getElementById("admin_submit_button").disabled;
	var username=document.getElementById("username").value;
	var password=document.getElementById("password").value;
	if(username==""||username=="Username")
	{
		window.alert("请输入 用户名 !");
		return false;
		}
	if(password==""||password=="Username")
	{
		window.alert("请输入 密码 !");
		return false;
		}
	document.getElementById("form1").action='<%=request.getContextPath()%>/login.do?method=login';
	document.getElementById("form1").submit();
		
	}
</script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form action="" id="form1" name="form1" method="post">
<div class="login_box">
<div class="wqo">
<div class="wqo_left">

 <div class="wqo_title"><img src="images/login_03.jpg" alt="" /></div>
 <div class="yqy">
 <div class="bdy">
   <input type="text" name="username" id="username" class="input" style="color:#b0b0b0" value="Username" onfocus="if(this.value=='Username'){this.value=''};this.style.color='black';" onblur="if(this.value==''||this.value=='Username'){this.value='Username';this.style.color='#b0b0b0';}"/>
 </div>
 <div class="bdys">
   <input type="password" name="password" id="password" class="input" style="color:#b0b0b0" value="Username" onfocus="if(this.value=='Username'){this.value=''};this.style.color='black';" onblur="if(this.value==''||this.value=='Username'){this.value='Username';this.style.color='#b0b0b0';}"/>
 </div>
 <div class="wjm">
   <span><a href="Retrieve.jsp">忘记密码？</a></span>
   <input type="checkbox" name="autologin" id="autologin" />
   下次自动登录</div>
    <%
   String error_msg=(String)request.getAttribute("error_msg");
   if(error_msg!=null)
   {
   		out.write(error_msg);
   }
    %>
   <div id="submit_button" class="wjm"><br />
  
   <img src="images/login_16.jpg" alt="" onclick="submit_me()" style="cursor:pointer"/>&nbsp; 
   <a href="register.jsp"><img src="images/login_12-06.jpg" alt="" /></a></div>
   <img src="images/logdin_03.jpg" alt="" onclick="submit_admin_me()" style="cursor:pointer"/>&nbsp;
  
 </div>
</div>
<div class="wqo_right"><img src="images/login_05.jpg" alt="" /></div>
</div>
</div>
</form>

</body>
</html>
